'Imports

Strict 
Import MaxGui.Drivers

Include "src/Engine/Assets.bmx"
Include "src/UI/EditorUI.bmx"
Include "src/UI/ProjectSelector.bmx"
Include "src/IO/Config.bmx"


AppTitle = "Spaget"





Global CurrentProject : String
Global Config : Configuration = New Configuration
Config.LoadConfig()



Global MainEd : Editor_Main
Global Proj : ProjectSelector


If CurrentProject = "" Then
	Proj = New ProjectSelector
Else
	MainEd = New Editor_main
	MainEd.Init()
EndIf



'MainLoop
Repeat

	If Proj <> Null Then
		Proj.Update()
	EndIf
	If MainEd <> Null Then
		MainEd.UpdateUI()
	EndIf

Forever
